ブロック崩し
5 SET WINDOW 0,300,0,300
40 LET a=10 !
LET b=10 !
LET i=3
LET j=2
45 LET c=2
LET c2=5
LET c3=15
LET c4=5
LET c5=15
LET c6=2
LET c7=5
LET c8=2
!SET DRAW MODE HIDDEN
!FOR k=0 TO 10000000
!NEXT k
!SET DRAW MODE EXPLICIT
60 FOR k=0 TO 100000
NEXT k
SET DRAW MODE EXPLICIT
SET DRAW MODE HIDDEN
CLEAR
70 LET a=a+i
LET b=b+j
SET AREA COLOR c
PLOT AREA: 0,300;0,290;100,290;100,300
SET AREA COLOR c2
PLOT AREA: 200,300;200,290;300,290;300,300
SET AREA COLOR c3
PLOT AREA: 100,290;100,280;200,280;200,290
SET AREA COLOR c4
PLOT AREA: 0,280;0,270;100,270;100,280
SET AREA COLOR c5
PLOT AREA: 200,280;200,270;300,270;300,280
SET AREA COLOR c6
PLOT AREA: 100,270;100,260;200,260;200,270
SET AREA COLOR c7
PLOT AREA: 0,260;0,250;100,250;100,260
SET AREA COLOR c8
PLOT AREA: 200,260;200,250;300,250;300,260
80 SET AREA COLOR "green"
DRAW disk WITH SCALE(5)*SHIFT(a,b)
!FOR k=1 TO 1000
!NEXT k
IF c=0 AND c2=0 AND c3=0 AND c4=0 AND c5=0 AND c6=0 AND c7=0 AND c8=0 THEN GOTO 500
IF c8>0 AND a=>200 AND a<=300 AND b=>250 AND b<=260 THEN GOTO 160 !c8 あたり判定 b
IF c7>0 AND a=>0 AND a<=100 AND b=>250 AND b<=260 THEN GOTO 165
IF c6>0 AND a=>100 AND a<=200 AND b=>260 AND b<=270 THEN GOTO 170
IF c5>0 AND a=>200 AND a<=300 AND b=>270 AND b<=280 THEN GOTO 175
IF c4>0 AND a=>0 AND a<=200 AND b=>270 AND b<=280 THEN GOTO 180
IF c3>0 AND a=>100 AND a<=200 AND b=>280 AND b<=290 THEN GOTO 185
IF c2>0 AND a=>200 AND a<=300 AND b=>290 AND b<=300 THEN GOTO 190
IF c>0 AND a=>0 AND a<=100 AND b=>290 AND b<=300 THEN GOTO 195
!FOR k=1 TO 100000
!NEXT k
130 IF a<10 THEN LET i=-i
140 IF b<10 THEN LET j=-j
150 IF a>300 THEN LET i=-i
IF b>300 THEN LET j=-j
GOTO 200
160 LET c8=0
GOTO 205
165 LET c7=0
GOTO 205
170 LET c6=0
GOTO 205
175 LET c5=0
GOTO 205
180 LET c4=0
GOTO 205
185 LET c3=0
GOTO 205
190 LET c2=0
GOTO 205
195 LET c=0
GOTO 205
200 IF a>10 THEN GOTO 60
IF b>10 THEN GOTO 60
IF a<300 THEN GOTO 60
IF b<290 THEN GOTO 60
205 RANDOMIZE
LET n=INT(4*RND) !0~4
210 IF n=0 THEN LET i=-i
220 IF n=1 THEN LET i=i
230 IF n=2 THEN LET j=-j
240 IF n=3 THEN LET j=j
300 !IF c=0 AND c2=0 AND c3=0 AND c4=0 AND c5=0 AND c6=0 AND c7=0 AND c8=0 THEN GOTO 500
!FOR k=0 TO 10000000
!NEXT k
!SET DRAW MODE EXPLICIT
GOTO 60 !CLEAR
500 END
迷路脱出
1 SET WINDOW 0,300,300,0
10 LET x=200
LET y=30
LET i=1
LET j=1
LET m=0
25 CLEAR
65 LET x=x+i
LET y=y+j
DRAW grid(50,50)
90 SET AREA COLOR 1
PLOT AREA: 50,50; 50,100; 150,100; 150,50
100 IF x>50 THEN GOTO 110 ELSE GOTO 200
110 IF x<150 THEN GOTO 120 ELSE GOTO 200
120 IF y>50 THEN GOTO 130 ELSE GOTO 200
130 IF y<100 THEN GOTO 140 ELSE GOTO 200
140 LET i=-i+m
150 LET j=-j
200 SET AREA COLOR 9
PLOT AREA: 0,0; 0,50; 50,50; 50,0
210 IF x>0 THEN GOTO 220 ELSE GOTO 300
220 IF x<50 THEN GOTO 230 ELSE GOTO 300
230 IF y<50 THEN GOTO 240 ELSE GOTO 300
240 IF y>0 THEN GOTO 250 ELSE GOTO 300
250 LET i=-i/2
260 LET j=-j
300 SET AREA COLOR 8
PLOT AREA: 0,150; 0,200; 150,200; 150,150
400 SET AREA COLOR 11
PLOT AREA: 0,250; 0,300; 50,300; 50,250
500 SET AREA COLOR 12
PLOT AREA: 200,50; 200,200; 250,200; 250,50
510 IF x>200 THEN GOTO 520 ELSE GOTO 600
520 IF x<250 THEN GOTO 530 ELSE GOTO 600
530 IF y<200 THEN GOTO 540 ELSE GOTO 600
540 IF y>50 THEN GOTO 550 ELSE GOTO 600
550 LET i=m
560 LET j=-j
600 SET AREA COLOR 13
PLOT AREA: 250,200; 250,250; 300,250; 300,200
700 SET AREA COLOR 14
PLOT AREA: 100,250; 100,300; 300,300; 300,250
900 SET AREA COLOR 11
985 DRAW disk WITH SCALE(8)*SHIFT(x,y)
SET AREA COLOR 3
986 DRAW disk WITH SCALE(5)*SHIFT(x,y)
987 FOR k=1 TO 300000
988 NEXT k
RANDOMIZE
LET m=RND
IF x>290 THEN LET i=-m-1
IF x<10 THEN LET i=m+1
IF y>290 THEN LET j=-m-1
IF y<10 THEN LET j=m+1
1500 GOTO 25
END
SET WINDOW 0,400,400,0
CLEAR
FOR s=1 TO 5
DECLARE STRING b$(100)
DIM c(1 TO 100)
LET r=0
LET p=0
INPUT a$
LET n=LEN(a$)
LET p=n-1
LET q=p-1
FOR m=1 TO n
LET b$(m)=a$(m:m)
NEXT m
PLOT TEXT ,AT 15*1,100+30*s:b$(1)
FOR m=2 TO p
200 RANDOMIZE
LET r=2+INT(q*RND)
FOR d=2 TO q
IF r=c(d) THEN GOTO 200
NEXT d
LET c(m)=r
PLOT TEXT ,AT 15*m,100+30*s:b$(r)
NEXT m
PLOT TEXT ,AT 15*n,100+30*s:b$(n)
NEXT s
END
見本です。
10 SET WINDOW 0,300,300,0
rem OPTION CHARACTER UTF8
DECLARE STRING a$(5),b$(5),e$(7),f$(7)
clear
20 RANDOMIZE
DIM c(1 TO 5)
DIM g(1 TO 7)
LET p=0
LET r=0
FOR m=1 TO 5
INPUT a$(m)
PLOT TEXT ,AT 10*m,100:a$(m)
NEXT m
LET b$(1)=a$(1)
LET b$(5)=a$(5)
FOR n=2 TO 4
100 randomize
110 LET r=2+INT(3*RND)
120 IF c(2)=r THEN GOTO 100 ELSE GOTO 130
130 IF c(3)=r THEN GOTO 100 ELSE GOTO 140
140 IF c(4)=r THEN GOTO 100 ELSE GOTO 170
170 LET c(n)=r
200 LET b$(n)=a$(r)
NEXT n
LET d$=b$(1)&b$(2)&b$(3)&b$(4)&b$(5)
PLOT TEXT ,AT 10,150:d$
220 FOR m=1 TO 7
INPUT e$(m)
PLOT TEXT ,AT 10*m,200:e$(m)
NEXT m
LET f$(1)=e$(1)
LET f$(7)=e$(7)
FOR n=2 TO 6
300 randomize
310 LET r=2+INT(5*RND)
320 IF g(2)=r THEN GOTO 300 ELSE GOTO 330
330 IF g(3)=r THEN GOTO 300 ELSE GOTO 340
340 IF g(4)=r THEN GOTO 300 ELSE GOTO 350
350 IF g(5)=r THEN GOTO 300 ELSE GOTO 360
360 IF g(6)=r THEN GOTO 300 ELSE GOTO 370
370 LET g(n)=r
400 LET f$(n)=e$(r)
NEXT n
LET h$=f$(1)&f$(2)&f$(3)&f$(4)&f$(5)&f$(6)&f$(7)
PLOT TEXT ,AT 10,250:h$
END
見本です。
10 SET WINDOW 0,300,300,0
clear
20 RANDOMIZE
DIM a$(1 TO 5)
DIM b$(1 TO 5)
DIM c(1 TO 5)
LET p=0
LET r=0
FOR m=1 TO 5
CHARACTER INPUT CLEAR: a$(m)
PLOT TEXT ,AT 10*m,100:a$(m)
NEXT m
FOR n=1 TO 5
100 randomize
110 LET r=1+INT(5*RND)
120 IF c(1)=r THEN GOTO 100 ELSE GOTO 130
130 IF c(2)=r THEN GOTO 100 ELSE GOTO 140
140 IF c(3)=r THEN GOTO 100 ELSE GOTO 150
150 IF c(4)=r THEN GOTO 100 ELSE GOTO 160
160 IF c(5)=r THEN GOTO 100 ELSE GOTO 170
170 LET c(n)=r
200 LET b$(n)=a$(r)
NEXT n
LET h$=b$(1)&b$(2)&b$(3)&b$(4)&b$(5)
PLOT TEXT ,AT 10,150:h$
END
見本です。
10 CLEAR
SET WINDOW 0 , 500 , 500 , 0
20 SET TEXT FONT "Times New Roman", 20
30 SET AREA COLOR 199
PLOT AREA : 435,435 ; 435,465 ; 465,465 ; 465,435
40 SET TEXT COLOR 0
PLOT TEXT ,AT 439,455: "click"
100 RANDOMIZE
300 LET n1=1+INT(5*RND)
LET n2=6+INT(5*RND)
LET n3=11+INT(5*RND)
400 IF n1=1 THEN GOTO 1100
IF n1=2 THEN GOTO 1200
IF n1=3 THEN GOTO 1300
IF n1=4 THEN GOTO 1400
IF n1=5 THEN GOTO 1500
500 IF n2=6 THEN GOTO 2100
IF n2=7 THEN GOTO 2200
IF n2=8 THEN GOTO 2300
IF n2=9 THEN GOTO 2400
IF n2=10 THEN GOTO 2500
600 IF n3=11 THEN GOTO 3100
IF n3=12 THEN GOTO 3200
IF n3=13 THEN GOTO 3300
IF n3=14 THEN GOTO 3400
IF n3=15 THEN GOTO 3500
1100 SET AREA COLOR 185
PLOT AREA : 100,100 ; 150,340 ; 350,350 ; 330,50
PLOT AREA : 435,330 ; 435,360 ; 465,360 ; 465,330
GOTO 500
1200 SET AREA COLOR 90
PLOT AREA : 50, 100 ; 100,340 ; 350,350 ; 330,50
PLOT AREA : 435,330 ; 435,360 ; 465,360 ; 465,330
GOTO 500
1300 SET AREA COLOR 74
PLOT AREA : 50,80 ; 50,350 ; 330,330 ; 350,50
PLOT AREA : 435,330 ; 435,360 ; 465,360 ; 465,330
GOTO 500
1400 SET AREA COLOR 11
PLOT AREA : 50,50 ; 50,270 ; 320,350 ; 350,50
PLOT AREA : 435,330 ; 435,360 ; 465,360 ; 465,330
GOTO 500
1500 SET AREA COLOR 158
PLOT AREA : 50,80 ; 50,340 ; 350,350 ; 350,60
PLOT AREA : 435,330 ; 435,360 ; 465,360 ; 465,330
GOTO 500
2100 SET AREA COLOR 152
PLOT AREA : 100,60 ; 50,340 ; 350,350 ; 300,50
PLOT AREA : 435,365 ; 435,395 ; 465,395 ; 465,365
GOTO 600
2200 SET AREA COLOR 199
PLOT AREA : 100,100 ; 50,340 ; 350,330 ; 200,80
PLOT AREA : 435,365 ; 435,395 ; 465,395 ; 465,365
GOTO 600
2300 SET AREA COLOR 75
PLOT AREA : 100,100 ; 50,340 ; 320,300 ; 330,50
PLOT AREA : 435,365 ; 435,395 ; 465,395 ; 465,365
GOTO 600
2400 SET AREA COLOR 229
PLOT AREA : 100,100 ; 50,340 ; 300,300 ; 330,50
PLOT AREA : 435,365 ; 435,395 ; 465,395 ; 465,365
GOTO 600
2500 SET AREA COLOR 27
PLOT AREA : 100,100 ; 50,340 ; 350,270 ; 330,50
PLOT AREA : 435,365 ; 435,395 ; 465,395 ; 465,365
GOTO 600
3100 SET AREA COLOR 181
3130 PLOT AREA : 150,100 ; 50,340 ; 250,250 ; 330,50
PLOT AREA : 435,400 ; 435,430 ; 465,430 ; 465,400
GET POINT: x , y
3132 IF x=>435 AND x=<465 AND y=>330 AND y=<360 THEN GOTO 3150 ELSE GOTO 3133
3133 IF x=>435 AND x=<465 AND y=>370 AND y=<390 THEN GOTO 3230 ELSE GOTO 3134
3134 IF x=>435 AND x=<465 AND y=>400 AND y=<430 THEN GOTO 3330 ELSE GOTO 3135
3135 IF x=>435 AND x=<465 AND y=>435 AND y=<460 THEN GOTO 3430 ELSE GOTO 3136
3136 IF x=>435 AND x=<465 AND y=>470 AND y=<490 THEN GOTO 10 ELSE GOTO 3100
3150 LET c31=11+INT(5*RND)
IF c31=11 THEN GOTO 3150 ! lottery one more
IF c31=12 THEN GOTO 3152
IF c31=13 THEN GOTO 3153
IF c31=14 THEN GOTO 3154
IF c31=15 THEN GOTO 3155
3151 SET AREA COLOR 181
GOTO 3130
3152 SET AREA COLOR 175
GOTO 3130
3153 SET AREA COLOR 170
GOTO 3130
3154 SET AREA COLOR 88
GOTO 3130
3155 SET AREA COLOR 200
GOTO 3130
3200 SET AREA COLOR 175
3230 PLOT AREA : 50,50 ; 50,250 ; 200,200 ; 200,70
PLOT AREA : 435,400 ; 435,430 ; 465,430 ; 465,400
3250 LET c32=11+INT(5*RND)
IF c32=11 THEN GOTO 3251
IF c32=12 THEN GOTO 3250 ! lottery one more
IF c32=13 THEN GOTO 3253
IF c32=14 THEN GOTO 3254
IF c32=15 THEN GOTO 3255
3251 SET AREA COLOR 181
GOTO 3130
3252 SET AREA COLOR 175
GOTO 3130
3253 SET AREA COLOR 170
GOTO 3130
3254 SET AREA COLOR 88
GOTO 3130
3255 SET AREA COLOR 200
GOTO 3130
3300 SET AREA COLOR 170
3330 PLOT AREA : 150,100 ; 100,340 ; 300,300 ; 330,100
PLOT AREA : 435,400 ; 435,430 ; 465,430 ; 465,400
3350 LET c33=11+INT(5*RND)
IF c33=11 THEN GOTO 3351
IF c33=12 THEN GOTO 3352
IF c33=13 THEN GOTO 3350 ! lottery one more
IF c33=14 THEN GOTO 3354
IF c33=15 THEN GOTO 3355
3351 SET AREA COLOR 181
GOTO 3130
3352 SET AREA COLOR 175
GOTO 3130
3353 SET AREA COLOR 170
GOTO 3130
3354 SET AREA COLOR 88
GOTO 3130
3355 SET AREA COLOR 200
GOTO 3130
3400 SET AREA COLOR 88
3430 PLOT AREA : 50,150 ; 65,300 ; 270,270 ; 350,70
PLOT AREA : 435,400 ; 435,430 ; 465,430 ; 465,400
3450 LET c34=11+INT(5*RND)
IF c34=11 THEN GOTO 3451
IF c34=12 THEN GOTO 3452
IF c34=13 THEN GOTO 3453
IF c34=14 THEN GOTO 3450 ! lottery one more
IF c34=15 THEN GOTO 3455
3451 SET AREA COLOR 181
GOTO 3130
3452 SET AREA COLOR 175
GOTO 3130
3453 SET AREA COLOR 170
GOTO 3130
3455 SET AREA COLOR 200
GOTO 3130
3500 SET AREA COLOR 200
3530 PLOT AREA : 100,50 ; 65,300 ; 270,270
PLOT AREA : 435,400 ; 435,430 ; 465,430 ; 465,400
3550 LET c35=11+INT(5*RND)
IF c35=11 THEN GOTO 3551
IF c35=12 THEN GOTO 3552
IF c35=13 THEN GOTO 3553
IF c35=14 THEN GOTO 3554
IF c35=15 THEN GOTO 3550 ! lottery one more
3551 SET AREA COLOR 181
GOTO 3130
3552 SET AREA COLOR 175
GOTO 3130
3553 SET AREA COLOR 170
GOTO 3130
3554 SET AREA COLOR 88
GOTO 3130
3555 SET AREA COLOR 200
GOTO 3130
END
見本です。
1 SET WINDOW 0,300,300,0
10 LET x=200
LET y=30
LET i=1
LET j=1
LET m=0
25 CLEAR
65 LET x=x+i
LET y=y+j
DRAW grid(50,50)
90 SET AREA COLOR 1
PLOT AREA: 50,50; 50,100; 150,100; 150,50
100 IF x>50 THEN GOTO 110 ELSE GOTO 200
110 IF x<150 THEN GOTO 120 ELSE GOTO 200
120 IF y>50 THEN GOTO 130 ELSE GOTO 200
130 IF y<100 THEN GOTO 140 ELSE GOTO 200
140 LET i=-i+m
150 LET j=-j
200 SET AREA COLOR 9
PLOT AREA: 0,0; 0,50; 50,50; 50,0
210 IF x>0 THEN GOTO 220 ELSE GOTO 300
220 IF x<50 THEN GOTO 230 ELSE GOTO 300
230 IF y<50 THEN GOTO 240 ELSE GOTO 300
240 IF y>0 THEN GOTO 250 ELSE GOTO 300
250 LET i=-i/2
260 LET j=-j
300 SET AREA COLOR 8
PLOT AREA: 0,150; 0,200; 150,200; 150,150
400 SET AREA COLOR 11
PLOT AREA: 0,250; 0,300; 50,300; 50,250
500 SET AREA COLOR 12
PLOT AREA: 200,50; 200,200; 250,200; 250,50
510 IF x>200 THEN GOTO 520 ELSE GOTO 600
520 IF x<250 THEN GOTO 530 ELSE GOTO 600
530 IF y<200 THEN GOTO 540 ELSE GOTO 600
540 IF y>50 THEN GOTO 550 ELSE GOTO 600
550 LET i=m
560 LET j=-j
600 SET AREA COLOR 13
PLOT AREA: 250,200; 250,250; 300,250; 300,200
700 SET AREA COLOR 14
PLOT AREA: 100,250; 100,300; 300,300; 300,250
900 SET AREA COLOR 11
985 DRAW disk WITH SCALE(8)*SHIFT(x,y)
SET AREA COLOR 3
986 DRAW disk WITH SCALE(5)*SHIFT(x,y)
987 FOR k=1 TO 300000
988 NEXT k
RANDOMIZE
LET m=RND
IF x>290 THEN LET i=-m-1
IF x<10 THEN LET i=m+1
IF y>290 THEN LET j=-m-1
IF y<10 THEN LET j=m+1
1500 GOTO 25
END
見本です
100 SET WINDOW 0,400,400,0
FOR r=0 TO 200
SET AREA COLOR 1
PLOT AREA:0,0; 0,400;400,400;400,0
SET LINE WIDTH 5
SET LINE COLOR 4
PLOT LINES: 140,0;200,220
PLOT LINES: 73,0;200,220
PLOT LINES: 0,20;200,220
PLOT LINES: 0,105;200,220
PLOT LINES: 0,167;200,220
PLOT LINES: 0,220;200,220
PLOT LINES: 0,273;200,220
PLOT LINES: 0,335;200,220
PLOT LINES: 20,400;200,220
PLOT LINES: 96,400;200,220
PLOT LINES: 150,400;200,220
PLOT LINES: 200,400;200,220
PLOT LINES: 248,400;200,220
PLOT LINES: 303,400;200,220
PLOT LINES: 400,335;200,220
PLOT LINES: 400,273;200,220
PLOT LINES: 400,167;200,220
PLOT LINES: 400,105;200,220
PLOT LINES: 400,20;200,220
PLOT LINES: 327,0;200,220
PLOT LINES: 260,0;200,220
SET LINE COLOR 1
200 SET LINE WIDTH 440
210 DRAW circle WITH SCALE(r+145)*SHIFT(200,220)
SET LINE WIDTH 40
DRAW circle WITH SCALE(r)*SHIFT(200,220)
IF r<50 THEN LET r1=0
IF r>50 THEN LET r1=r-50
DRAW circle WITH SCALE(r1)*SHIFT(200,220)
IF r<100 THEN LET r2=0
IF r>100 THEN LET r2=r-100
DRAW circle WITH SCALE(r2)*SHIFT(200,220)
IF r<150 THEN LET r3=0
IF r>150 THEN LET r3=r-150
DRAW circle WITH SCALE(r3)*SHIFT(200,220)
IF r<200 THEN LET r4=0
IF r>200 THEN LET r4=r-200
DRAW circle WITH SCALE(r4)*SHIFT(200,220)
SET AREA COLOR 171
PLOT AREA:199,0; 199,220;201,220;201,0
SET AREA COLOR 38
DRAW disk WITH SCALE(5)*SHIFT(200,220)
FOR t=0 TO 500000
NEXT t
CLEAR
NEXT r
GOTO 100
END
i j k l m のキーを押すと、円盤がその方向へ動く。kが中心。
10 SET WINDOW 0,400,400,0
30 CLEAR
40 CHARACTER INPUT nowait :a$
IF a$="i" THEN DRAW disk WITH SCALE(20)*SHIFT(200,140)
IF a$="j" THEN DRAW disk WITH SCALE(20)*SHIFT(140,200)
IF a$="l" THEN DRAW disk WITH SCALE(20)*SHIFT(260,200)
IF a$="m" THEN DRAW disk WITH SCALE(20)*SHIFT(200,260)
IF a$="k" THEN DRAW disk WITH SCALE(20)*SHIFT(200,200)
FOR ti=0 TO 1000000
NEXT ti
GOTO 30
END
何かキーを押すと大きなアルファベットが順番に出る。
5 DIM a(5,5)
LET i=0
10 SET WINDOW 0,300,300,0
CHARACTER INPUT s$
20 FOR y=1 TO 5
30 for x=1 to 5
40 READ p
50 LET a(x,y)=p
60 NEXT x
70 NEXT y
100 FOR y=1 TO 5
110 for x=1 to 5
120 IF a(x,y)=0 THEN
SET AREA COLOR 0
GOTO 140
END IF
130 IF a(x,y)=1 THEN
SET AREA COLOR 1
GOTO 140
END IF
140 PLOT AREA: 50+20*x,50+20*y;70+20*x,50+20*y;70+20*x,70+20*y;50+20*x,70+20*y
150 NEXT x
160 NEXT y
170 LET i=i+1
180 IF i=26 THEN RESTORE
190 IF i=26 THEN GOTO 5
200 GOTO 10
1010 data 0,1,1,1,0,1,0,0,0,1,1,1,1,1,1,1,0,0,0,1,1,0,0,0,1
rem A
1020 data 1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1
rem B
1030 DATA 1,1,1,1,1,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,1,1,1,1
REM C
1040 DATA 1,1,1,1,0,1,0,0,1,1,1,0,0,0,1,1,0,0,1,1,1,1,1,1,0
REM D
1050 data 1,1,1,1,1,1,0,0,0,0,1,1,1,1,0,1,0,0,0,0,1,1,1,1,1
rem E
1060 data 1,1,1,1,1,1,0,0,0,0,1,1,1,1,0,1,0,0,0,0,1,0,0,0,0
rem F
1070 data 1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,0,0,0,1,1,1,1,1,1
REM G
1080 data 1,0,0,0,1,1,0,0,0,1,1,1,1,1,1,1,0,0,0,1,1,0,0,0,1
REM H
1090 data 0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0
rem I
1100 data 0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,0,1,0,0,1,1,1,0
rem J
1110 data 1,1,0,0,1,1,1,0,1,0,1,1,1,0,0,1,1,0,1,0,1,1,0,0,1
rem K
1120 data 1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,1,1,1,0
REM L
1130 data 1,1,0,1,1,1,1,1,1,1,1,0,1,0,1,1,0,0,0,1,1,0,0,0,1
rem M
1140 data 1,1,0,0,1,1,1,0,0,1,1,0,1,0,1,1,0,0,1,1,1,0,0,1,1
REM N
1150 data 1,1,1,1,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,1,1,1,1
REM O
1160 data 1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,0,0,1,0,0,0,0
REM P
1170 data 1,1,1,1,1,1,0,0,0,1,1,0,1,1,1,1,0,1,0,1,1,1,1,1,1
REM Q
1180 data 1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,1,0,1,0,0,1,1
REM R
1190 DATA 1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1
REM S
1195 data 1,1,1,1,1,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0
REM T
1200 data 1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,1,1,1,1
REM U
1210 data 1,0,0,0,1,1,0,0,0,1,0,1,0,1,0,0,1,0,1,0,0,0,1,0,0
REM V
1220 data 1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0
REM W
1230 data 1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1
REM X
1240 data 1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0
REM Y
1250 DATA 1,1,1,1,1,0,0,0,1,1,0,0,1,0,0,1,1,0,0,0,1,1,1,1,1
REM Z
END
大小当てゲーム
100 PRINT "Hi&Lowです。"
110 PRINT "ルール説明を読みますか?"
120 PRINT "Yesなら1を、Noなら2を押してください。"
130 SET ECHO "off"
140 CHARACTER INPUT CLEAR :s$
150 IF s$="1" THEN GOTO 180
160 IF s$="2" THEN GOTO 200
170 GOTO 140
180 PRINT "それじゃぁ説明しますね。"
190 GOTO 220
200 PRINT "説明は不要ですね。"
210 GOTO 240
220 PRINT "先に出た数より後の数の方が、"
230 PRINT "多きいか小さいか当てる簡単なゲームです。"
240 PRINT "では、早速始めます。"
250 PRINT "(エンターを押してください。)"
260 CHARACTER INPUT CLEAR :m$
270 RANDOMIZE
280 LET a=INT(RND*10)+1
290 PRINT "一枚目は"
300 PRINT a
310 PRINT "です。"
320 PRINT "ではこの数より大きいですか?小さいですか?"
330 PRINT "大きければHキーを。小さければLキーを押してください。"
340 SET ECHO "off"
350 CHARACTER INPUT CLEAR :b$
360 RANDOMIZE
370 LET c=INT(RND*10)+1
380 PRINT "二枚目は"
390 PRINT c
400 PRINT "です。"
410 CHARACTER INPUT CLEAR :m$
420 IF b$="h" THEN GOTO 470
430 IF b$="l" THEN GOTO 560
440 PRINT "きちんとHかLを選んで下さい。やり直しです。"
450 CHARACTER INPUT CLEAR :m$
460 GOTO 270
470 IF a>c THEN GOTO 520
480 IF a<c THEN GOTO 500
490 IF a=c THEN GOTO 540
500 PRINT "正解!あなたの勝ちです!"
510 GOTO 590
520 PRINT "残念!あなたの負けです!"
530 GOTO 590
540 PRINT "引き分けです。"
550 GOTO 590
560 IF a>c THEN GOTO 500
570 IF a<c THEN GOTO 520
580 IF a=c THEN GOTO 540
590 PRINT "よければまた再チャレンジしてくださいね♪"
600 END
UFOは飛ぶ
20 SET POINT STYLE 1
30 OPTION ANGLE DEGREES
40 FOR t=0 TO 360 STEP 6
50 LET i=SIN (t)/4
60 LET j=SIN(t)/12+COS (t)/12
70 LET a=a+i
LET b=b+j
80 SET AREA COLOR 4
DRAW disk WITH SCALE(0.5)*SHIFT(-a,-b)
REM SET AREA COLOR 0
REM PLOT AREA: -a-0.5,-b;-a-0.5,-b-0.5;-a+0.5,-b-0.5;-a+0.5,b
SET AREA COLOR 4
DRAW disk WITH SCALE(0.9)*SHIFT(-a,-b-0.7)
SET AREA COLOR 0
PLOT AREA: -a-0.9,-b-0.3;-a-0.9,-b-1.6;-a+0.9,-b-1.6;-a+0.9,-b-0.3
SET AREA COLOR 6
DRAW disk WITH SCALE(0.15)*SHIFT(-a,-b+0.1)
SET AREA COLOR 4
DRAW disk WITH SCALE(0.15)*SHIFT(-a,-b-0.3)
DRAW disk WITH SCALE(0.15)*SHIFT(-a-0.3,-b-0.3)
DRAW disk WITH SCALE(0.15)*SHIFT(-a+0.3,-b-0.3)
SET AREA COLOR 5
DRAW disk WITH SCALE(0.6)*SHIFT(-a,-b-2)
SET AREA COLOR 0
PLOT AREA: -a-0.7,-b-1;-a-0.7,-b-2.2;-a+0.7,-b-2.2;-a+0.7,-b-1
SET AREA COLOR 5
PLOT AREA: -a,-b-0.6;-a-0.55,-b-2.2;-a+0.55,-b-2.2
100 FOR ti=1 TO 100000
NEXT ti
110 CLEAR
120 NEXT t
130 GOTO 10
500 END
衛星軌道
20 SET POINT STYLE 1
30 OPTION ANGLE DEGREES
40 FOR t=0 TO 360 STEP 6
50 LET x=SIN (t)
60 LET y=SIN(t)/3+COS (t)/3
70 REM PLOT POINTS: x,y
80 SET COLOR 1
DRAW disk WITH SCALE(0.1)*SHIFT(x,y)
85 DRAW circle WITH SCALE(0.5)*SHIFT(0,0)
88 REM WAIT DELAY 0.05
90 SET COLOR 0
95 IF y<0 THEN DRAW disk WITH SCALE(0.49)*SHIFT(0,0)
100 WAIT DELAY 0.4
110 CLEAR
120 NEXT t
130 GOTO 10
500 END
二つのボール
50 LET a=30
LET b=30
LET i=1
LET j=1
LET c=130
LET d=30
LET m=1
LET n=1
60 CLEAR
70 LET a=a+i
LET b=b+j
LET c=c+m
LET d=d+n
85 DRAW disk WITH SCALE(5)*SHIFT(a,b)
DRAW disk WITH SCALE(8)*SHIFT(c,d)
86 FOR k=1 TO 2000
87 NEXT k
88 DRAW disk WITH SCALE(8)*SHIFT(a,b)
DRAW disk WITH SCALE(10)*SHIFT(c,d)
89 FOR k=1 TO 2000
90 NEXT k
130 IF a<20 THEN GOTO 300
140 IF b<20 THEN GOTO 300
150 IF a>280 THEN GOTO 330
160 IF b>280 THEN GOTO 330
IF c<20 THEN GOTO 1300
IF d<20 THEN GOTO 1300
IF c>280 THEN GOTO 1330
IF d>280 THEN GOTO 1330
210 IF a=c THEN 220
220 IF c=d THEN 330
270 GOTO 60
300 LET i=INT(4*RND)
RANDOMIZE
LET j=INT(4*RND)
GOTO 60
310 LET i=INT(-4*RND)
RANDOMIZE
LET j=INT(4*RND)
GOTO 60
320 LET i=INT(4*RND)
RANDOMIZE
LET j=INT(-4*RND)
GOTO 60
330 LET i=INT(-4*RND)
RANDOMIZE
LET j=INT(-4*RND)
GOTO 60
1300 LET m=INT(4*RND)
RANDOMIZE
LET n=INT(4*RND)
GOTO 60
1310 LET m=INT(-4*RND)
RANDOMIZE
LET n=INT(4*RND)
GOTO 60
1320 LET m=INT(4*RND)
RANDOMIZE
LET n=INT(-4*RND)
GOTO 60
1330 LET m=INT(-4*RND)
RANDOMIZE
LET n=INT(-4*RND)
GOTO 60
1500 GOTO 60
END
チカチカするボール
5 SET WINDOW 0,300,0,300
1650 LET x1=INT(150*RND)
LET p1=INT(300*RND)
LET q1=INT(300*RND)
SET AREA COLOR x1
DRAW disk WITH SCALE(x1)*SHIFT(p1,q1)
1660 LET x2=INT(150*RND)
LET p2=INT(300*RND)
LET q2=INT(300*RND)
SET AREA COLOR x2
DRAW disk WITH SCALE(x2)*SHIFT(p2,q2)
1670 LET x3=INT(150*RND)
LET p3=INT(300*RND)
LET q3=INT(300*RND)
SET AREA COLOR x3
DRAW disk WITH SCALE(x3)*SHIFT(p3,q3)
1680 FOR k=1 TO 150000
NEXT k
clear
1700 GOTO 5
END
ブロック崩しの例
5 SET WINDOW 0,300,0,300
50 LET a=30
LET b=30
LET i=3
LET j=2
55 LET ye=6
LET re=4
LET bl=3
LET gr=5
60 CLEAR
70 LET a=a+i
LET b=b+j
SET AREA COLOR ye
PLOT AREA: 0,300;0,290;300,290;300,300
SET AREA COLOR re
PLOT AREA: 0,290;0,280;300,280;300,290
SET AREA COLOR bl
PLOT AREA: 0,280;0,270;300,270;300,280
SET AREA COLOR gr
PLOT AREA: 0,270;0,260;300,260;300,270
80 SET AREA COLOR "black"
DRAW disk WITH SCALE(5)*SHIFT(a,b)
FOR k=1 TO 7000
NEXT k
IF b=250 THEN GOTO 160
IF b=270 THEN GOTO 165
IF b=280 THEN GOTO 170
IF b=290 THEN GOTO 175
FOR k=1 TO 7000
NEXT k
130 IF a<30 THEN LET i=-i
140 IF b<30 THEN LET j=-j
150 IF a>290 THEN LET i=-i
IF b>290 THEN LET j=-j
GOTO 200
160 LET gr=0
GOTO 205
165 LET bl=0
GOTO 205
170 LET re=0
GOTO 205
175 LET ye=0
GOTO 205
200 IF a>30 THEN GOTO 60
IF b>30 THEN GOTO 60
IF a<290 THEN GOTO 60
IF b<260 THEN GOTO 60
205 RANDOMIZE
LET n=INT(4*RND)
210 IF n=0 THEN LET i=-i
220 IF n=1 THEN LET i=i
230 IF n=2 THEN LET j=-j
240 IF n=3 THEN LET j=j
300 IF ye=0 THEN GOTO 500
GOTO 60
500 END
スロットマシン
5 LET total=100
10 SET WINDOW 0,300,300,0
LET t=0
SET TEXT FONT "MS 明朝",30
PRINT "sキーを押して下さい。"
50 CHARACTER INPUT NOWAIT: s$
IF s$ = "s" THEN GOTO 100
GOTO 50
100 RANDOMIZE
FOR i=0 TO 25
CLEAR
LET t=i*i
LET a=INT(RND*10)
LET p=a
GOSUB 1000
LET a$=p$
LET b=INT(RND*10)
LET p=b
GOSUB 1000
LET b$=p$
LET c=INT(RND*10)
LET p=c
GOSUB 1000
LET c$=p$
LET d=INT(RND*10)
LET p=d
GOSUB 1000
LET d$=p$
LET e=INT(RND*10)
LET p=e
GOSUB 1000
LET e$=p$
LET f=INT(RND*10)
LET p=f
GOSUB 1000
LET f$=p$
LET g=INT(RND*10)
LET p=g
GOSUB 1000
LET g$=p$
LET h=INT(RND*10)
LET p=h
GOSUB 1000
LET h$=p$
LET j=INT(RND*10)
LET p=j
GOSUB 1000
LET j$=p$
PLOT TEXT ,AT 100,110,USING "## ## ##" : a$,b$,c$
PLOT TEXT ,AT 100,140,USING "## ## ##" : d$,e$,f$
PLOT TEXT ,AT 100,170,USING "## ## ##" : g$,h$,j$
WAIT DELAY t/500
NEXT i
IF a$=b$ AND b$=c$ THEN
PLOT TEXT ,AT 70,200 : "JACK POT !!!"
LET gain=10
PLOT TEXT ,AT 70,230,USING "##":gain
GOTO 500
END IF
IF d$=e$ AND e$=f$ THEN
PLOT TEXT ,AT 70,200 : "JACK POT !!!"
LET gain=20
PLOT TEXT ,AT 70,230,USING "##":gain
GOTO 500
END IF
IF g$=h$ AND h$=j$ THEN
PLOT TEXT ,AT 70,200 : "JACK POT !!!"
LET gain=30
PLOT TEXT ,AT 70,230,USING "##":gain
GOTO 500
END IF
IF a$=d$ AND d$=g$ THEN
PLOT TEXT ,AT 70,200 : "JACK POT !!!"
LET gain=40
PLOT TEXT ,AT 70,230,USING "##":gain
GOTO 500
END IF
IF b$=e$ AND e$=h$ THEN
PLOT TEXT ,AT 70,200 : "JACK POT !!!"
LET gain=50
PLOT TEXT ,AT 70,230,USING "##":gain
GOTO 500
END IF
IF c$=f$ AND f$=j$ THEN
PLOT TEXT ,AT 70,200 : "JACK POT !!!"
LET gain=60
PLOT TEXT ,AT 70,230,USING "##":gain
GOTO 500
END IF
IF a$=e$ AND e$=j$ THEN
PLOT TEXT ,AT 70,200 : "JACK POT !!!"
LET gain=70
PLOT TEXT ,AT 70,230,USING "##":gain
GOTO 500
END IF
IF c$=e$ AND e$=g$ THEN
PLOT TEXT ,AT 70,200 : "JACK POT !!!"
LET gain=80
PLOT TEXT ,AT 70,230,USING "##":gain
GOTO 500
END IF
LET gain=-10
500 LET total=total+gain
PLOT TEXT ,AT 70,260,USING "TOTAL=###":total
IF total=0 THEN GOTO 2000
GOTO 10
STOP
1000 IF p=1 THEN LET p$="○"
1010 IF p=2 THEN LET p$="×"
1020 IF p=3 THEN LET p$="△"
1030 IF p=4 THEN LET p$="◎"
1040 IF p=5 THEN LET p$="▽"
1050 IF p=6 THEN LET p$="◇"
1060 IF p=7 THEN LET p$="□"
1070 IF p=8 THEN LET p$="●"
1080 IF p=9 THEN LET p$="■"
1090 RETURN
2000 END
************************
VRハンド
20 CLEAR
SET WINDOW 0,300,300,0
SET LINE WIDTH 5
25 CHARACTER INPUT NOWAIT: a$
30 if a$ = "n" then LET i1 = i1-15
40 if a$ = "u" then LET i2 = i2-10
50 if a$ = "i" then LET i3 = i3-10
60 if a$ = "o" then LET i4 = i4-10
70 if a$ = "p" then LET i5 = i5-10
100 LET i1 = i1+2
110 LET i2 = i2+2
120 LET i3 = i3+2
130 LET i4 = i4+2
140 LET i5 = i5+2
200 DRAW disk WITH SCALE(17)*SHIFT(45+i1,135+i1)
PLOT LINES: 45+i1,135+i1;135,233
210 DRAW disk WITH SCALE(15)*SHIFT(135,35+i2*2)
PLOT LINES: 135,35+i2*2;135,193
220 DRAW disk WITH SCALE(15)*SHIFT(175,35+i3*2)
PLOT LINES: 175,35+i3*2;175,193
230 DRAW disk WITH SCALE(15)*SHIFT(215,35+i4*2)
PLOT LINES: 215,35+i4*2;215,193
240 DRAW disk WITH SCALE(13)*SHIFT(255,45+i5*2)
PLOT LINES: 255,45+i5*2;255,193
1000 WAIT DELAY 0.1
1010 IF i1 >= 60 THEN LET i1 = 58
1020 if i2 >= 60 then LET i2 = 58
1030 if i3 >= 60 then LET i3 = 58
1040 if i4 >= 60 then LET i4 = 58
1050 if i5 >= 60 then LET i5 = 58
1100 GOTO 20
END
*************************
回転図形
DECLARE EXTERNAL PICTURE circle0
LET a=5
SET WINDOW -1.3,1.3,-1.3,1.3
FOR tt=0 TO 2*PI STEP PI/180
SET DRAW MODE hidden
CLEAR
DRAW axes
SET LINE color 0
DRAW circle
SET LINE COLOR 4
DRAW circle0 WITH ROTATE(-(a-2)*t)*SCALE(1/a)*SHIFT((1-1/a)*COS(t),(1-1/a)*SIN(t))
SET LINE COLOR 2
FOR t=0 TO tt STEP PI/100
LET x=(1-2/a)*COS(t)+(1/a)*COS((a-1)*t)
LET y=(1-2/a)*SIN(t)-(1/a)*SIN((a-1)*t)
PLOT LINES:x,y;
NEXT t
SET DRAW MODE explicit
WAIT DELAY 0.04
NEXT tt
END
EXTERNAL PICTURE circle0
SET AREA COLOR 4
DRAW disk WITH SCALE(0.2)*SHIFT(2,1)
SET AREA COLOR 5
DRAW disk WITH SCALE(0.2)*SHIFT(1,1)
SET AREA COLOR 3
DRAW disk WITH SCALE(0.1)*SHIFT(1,0)
SET AREA COLOR 6
DRAW disk WITH SCALE(0.3)*SHIFT(2,2)
SET AREA COLOR 7
DRAW disk WITH SCALE(0.4)*SHIFT(2,2)
SET AREA COLOR 2
DRAW disk WITH SCALE(0.3)*SHIFT(0,0)
SET AREA COLOR 3
DRAW disk WITH SCALE(0.3)*SHIFT(2,2)
SET AREA COLOR 5
DRAW disk WITH SCALE(0.1)*SHIFT(-3,3)
SET AREA COLOR 6
DRAW disk WITH SCALE(0.5)*SHIFT(-4,0)
SET AREA COLOR 6
DRAW disk WITH SCALE(0.2)*SHIFT(2,0)
SET AREA COLOR 7
DRAW disk WITH SCALE(0.4)*SHIFT(0,-3)
SET AREA COLOR 2
DRAW disk WITH SCALE(0.5)*SHIFT(4,0)
SET AREA COLOR 4
DRAW disk WITH SCALE(0.5)*SHIFT(7,6)
SET AREA COLOR 5
DRAW disk WITH SCALE(0.2)*SHIFT(1,7)
SET AREA COLOR 3
DRAW disk WITH SCALE(0.3)*SHIFT(-5,0)
SET AREA COLOR 6
DRAW disk WITH SCALE(0.4)*SHIFT(2,-2)
SET AREA COLOR 7
DRAW disk WITH SCALE(0.3)*SHIFT(1,1)
SET AREA COLOR 0
DRAW disk WITH SCALE(0.2)*SHIFT(1,1)
SET AREA COLOR 2
DRAW disk WITH SCALE(0.1)*SHIFT(0,4)
SET AREA COLOR 4
DRAW disk WITH SCALE(0.3)*SHIFT(-5,2)
SET AREA COLOR 5
DRAW disk WITH SCALE(0.2)*SHIFT(-3,-3)
SET AREA COLOR 0
DRAW disk WITH SCALE(0.4)*SHIFT(4,0)
SET AREA COLOR 6
DRAW disk WITH SCALE(0.1)*SHIFT(2,7)
SET AREA COLOR 7
DRAW disk WITH SCALE(0.1)*SHIFT(-4,3)
SET AREA COLOR 2
DRAW disk WITH SCALE(0.2)*SHIFT(2,0)
SET AREA COLOR 0
DRAW disk WITH SCALE(0.1)*SHIFT(-3,-3)
SET AREA COLOR 0
DRAW disk WITH SCALE(0.4)*SHIFT(4,0)
SET AREA COLOR 6
DRAW disk WITH SCALE(0.4)*SHIFT(5,5)
SET AREA COLOR 9
DRAW disk WITH SCALE(0.1)*SHIFT(-3,3)
SET AREA COLOR 2
DRAW disk WITH SCALE(0.2)*SHIFT(5,5)
SET AREA COLOR 4
DRAW disk WITH SCALE(0.2)*SHIFT(5,1)
SET AREA COLOR 5
DRAW disk WITH SCALE(0.2)*SHIFT(1,7)
SET AREA COLOR 3
DRAW disk WITH SCALE(0.1)*SHIFT(5,6)
SET AREA COLOR 6
DRAW disk WITH SCALE(0.3)*SHIFT(3,4)
SET AREA COLOR 4
DRAW disk WITH SCALE(0.3)*SHIFT(2,-2)
SET AREA COLOR 2
DRAW disk WITH SCALE(0.3)*SHIFT(-4,4)
SET AREA COLOR 4
DRAW disk WITH SCALE(0.1)*SHIFT(5,-2)
SET AREA COLOR 5
DRAW disk WITH SCALE(0.5)*SHIFT(-5,3)
SET AREA COLOR 6
DRAW disk WITH SCALE(0.3)*SHIFT(-5,3)
SET AREA COLOR 6
DRAW disk WITH SCALE(0.2)*SHIFT(4,0)
SET AREA COLOR 3
DRAW disk WITH SCALE(0.7)*SHIFT(-5,-5)
SET AREA COLOR 0
DRAW disk WITH SCALE(0.6)*SHIFT(-5,-5)
END PICTURE